<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <base target="_blank"/>
    <title>循环</title>
    <script src="plugin/angular.min.js"></script>

    <script>

        var app = angular.module('repeatApp', []);
        //定义控制器
        app.controller('repeatController', function ($scope) {
            $scope.list = [2, 34, 5234, 234];


            $scope.person = [
                {"name": "fauks", age: 12},
                {"name": "jay", age: 22},
                {"name": "slx", age: 32}

            ]
        });

    </script>
</head>


<body ng-app="repeatApp" ng-controller="repeatController">

<!--循环数组-->
<table>
    <tr ng-repeat="x in list">
        <td>{{x}}</td>
    </tr>
</table>

<!-- 循环对象数组-->
<table>
    <thead>
    <tr>
        <td>姓名</td>
        <td>年龄</td>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="entity in person">
        <td>{{entity.name}}</td>
        <td>{{entity.age}}</td>
    </tr>
    </tbody>
</table>

</body>
</html>